
	/*获取页面catalogld的值*/
	$(".list-wrapper").empty();

//	var catalogId = GetQueryString("catalogId");
	// var title = decodeURI(GetQueryString("title"))
	var title = getUrlParam("title")
//	console.log(title)
	var hot = GetQueryString("hot")
	
	/*热销商品*/
	if(hot){
		console.log('0')
		MuiAjaxFn('api/bizrelatives/selecthot?page=1&pagesize=13',{'hotState':'1','sorting':'present_price','tosort':'desc'},function(data){
		if (hot==1) {
			$(".mui-title").text("热销产品")
		}else{
			$(".mui-title").text("最新产品")
		}
		
		if(data.pageInfo.size>0){
			$.each(data.pageInfo.list,function(index,oneItem){
				console.log(oneItem)
				var id = oneItem.bizCommodityForSales.commodityNumber;
				var price  = 0 ;
				if(oneItem.bizCommodityForSalePrices.length > 0 ){
					price = (oneItem.bizCommodityForSalePrices[0].presentPrice)/100;
				}
				salesVolume = oneItem.bizCommodityForSales.salesVolume ? oneItem.bizCommodityForSales.salesVolume : 0;
				stra = ''; 	
				stra += '<div class="app-row bottomHr"  data-cNum="'+id+'">'+
							'<div class="s-pimg" style="background-image: url('+IMGUrl+''+oneItem.bizCommodityForSales.mainPhoto+');background-size:100% 100%;"></div>'+
							'<div class="s-pcont"  data-cNum="'+id+'">'+
								'<p>'+oneItem.bizCommodityForSales.title+'</p>'+
								'<em>广东 深圳</em>'+
								'<input type="button" value="自营" />'+
				
								'<b>￥'+price+'</b>'+
								
								'<span>'+salesVolume+'人付款</span>'+
								'<div class="iconfont icon-add add_car" title='+id+' data-price="'+price*100+'"></div>'+
//								'<div class="iconfont addCollection icon-shoucang1" title='+id+'></div>'+
								
							'</div>'+
						'</div>'
						$('.listcont').append(stra)
						
			})
			$(".s-pimg , .s-pcont p , .s-pcont em , .s-pcont b ").on("tap",function(){
				window.location.href='ProductDetail.html?commodityNumber='+$(this).parent().attr("data-cNum");
			});
			
			$(".add_car").on("tap",function(){
			//		点击加入购物车
				  if(localStorage.userToken==undefined){
			        WechatNewLogin();
			    }
			    else{
					var num = ($(this).attr("title"))
					var price = ($(this).attr("data-price"))
					MuiAjaxFn("client/detailed/insertdetailed",{'commodityNumber':num,'needNumber':'1',"newNeedNumber":1,"add_Price":price},function(data){
						if(data.htmlState.status==200){
							mui.toast('加入购物车成功');
						}
					})
			    }
			});	
		}
		else{
			
			nodata('当前分类下没有商品,敬请期待', '.PD_content')
			strb = '';
			strb += '<div class="nodatabox">'+
					'<img src="img/logo.jpg">'+
					'<p>当前分类下没有商品,敬请期待！</p>'+
				'</div>'
				$(".list-wrapper").append(strb)
		}

		})

	}